<?php
require_once 'libraries/utilities/users.php';

//Logined user
if (isset($_POST['submit'])) {
    $a = false;
    for ($i = 0; $i < count($users); $i++) {
        if (strcmp($_POST["username"], $users[$i]["username"]) == 0 && 
            strcmp($_POST["password"], $users[$i]["password"]) == 0) {
            $a = true;
            break;
        } else {
            $a = false;
        }
    }

    if ($a == true) {
        echo "ban da nhap thanh cong";
    } else {
        echo "ban dang nhap chua thanh cong,nhap lai...";
    }
}
?>

